import request from '@/utils/request'

const api_name = '/admin/group'

export default {

  fetchList(params) {
      return request({
        url: `${api_name}/page`,
        method:'get',
        params:params
      })
  },

  getGroupList(params) {
    return request({
      url:`${api_name}/list`,
        method: 'get',
        params: params
    })
  },

  getAllGroupList() {
    return request({
      url:`${api_name}/all`,
        method: 'get'
    })
  },
    
  getAttrGroup(params) {
    return request({
        url: `${api_name}/info`,
        method:'get',
        params:params
    })
  },
      
  createAttrGroup(data) {
    return request({
      url: `${api_name}/create`,
      method: 'post',
      data: data
    })
  },
      
  deleteAttrGroup(data) {
      return request({
        url:`${api_name}/delete`,
        method: 'post',
        data: data
      })
  },
      
  updateAttrGroup(data) {
      return request({
        url:`${api_name}/update`,
        method: 'post',
        data: data
      })
  },
        
  getGrouptWithAttr(data) {
      return request({
        url:`${api_name}/withattr`,
        method: 'get',
        params: data
      })
  }
  
}

